import axios from '@/utils/request';
import { BASE_URL } from '@/api';

export const menuList = (params) => {
	return axios.get(`${BASE_URL}/menu/list`, { params: params });
};

// export const menuListNoRecursion = () => {
// 	return axios.get(`${BASE_URL}/menu/list/noRecursion`);
// };

export const permissionList = (params) => {
	return axios.get(`${BASE_URL}/permission/list`, { params: params });
};

export const addmMenu = (params) => {
	return axios.post(`${BASE_URL}/menu`, params);
};

export const editMenu = (params) => {
	return axios.put(`${BASE_URL}/menu`, params);
};

export const removeMenu = (id) => {
	return axios.delete(`${BASE_URL}/menu/${id}`);
};
